]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceThumbnails: Update target scale when fully unexpanded
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 20 May 2024 18:26:42 +0000 (20:26 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 22 May 2024 12:02:00 +0000 (12:02 +0000)
We currently only update the scale when fully expanded. In order
to fix the initial expand transition, also update the scale
when fully unexpanded.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3331>

js/ui/workspaceThumbnail.js

index 4e490478befe7e02152815ecd245291add25b9e6..143d1cd754bb515065ebd1929c0492d0a36b7666 100644 (file)
@@ -1266,7 +1266,7 @@ export const ThumbnailsBox = GObject.registerClass({
 
         // Compute the scale we'll need once everything is updated,
         // unless we are currently transitioning
-        if (this._expandFraction === 1) {
+        if (this._expandFraction === 0 || this._expandFraction === 1) {
             const [, natWidth] = this.get_preferred_width(-1);
             const [, natHeight] = this.get_preferred_height(natWidth);
             const totalSpacing = (nWorkspaces - 1) * spacing;